import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../components/login.vue')
  },
  {
    path: '/home',
    name: 'home',
    meta:{permissName:'钉钉首页',},
    component: () => import(/* webpackChunkName: "about" */ '../views/home.vue')
  },
  {
    path: '/work',
    name: 'work',
    meta:{permissName:'钉钉企业走访底部',},
    component: () => import(/* webpackChunkName: "about" */ '../views/work.vue')
  },
  {
    path: '/query',
    name: 'query',
    meta:{permissName:'钉钉查询服务',},
    component: () => import(/* webpackChunkName: "about" */ '../views/query.vue')
  },
  {
    path: '/analys',
    name: 'analys',
    meta:{permissName:'钉钉统计分析',},
    component: () => import(/* webpackChunkName: "about" */ '../views/analys.vue')
  },
  // 公司走访
  {
    path: '/companyvisit',
    name: 'companyvisit',
    meta:{permissName:'钉钉企业走访统计',},
    component: () => import(/* webpackChunkName: "about" */ '../components/analys/companyVisit.vue')
  },
  // 税务分析
  {
    path: '/taxanalys',
    name: 'taxanalys',
    meta:{permissName:'钉钉税收排名统计',},
    component: () => import(/* webpackChunkName: "about" */ '../components/analys/taxAnalys.vue')
  },
  // 产业分布
  {
    path: '/industrialdistribution',
    name: 'industrialdistribution',
    meta:{permissName:'钉钉产业分布统计',},
    component: () => import(/* webpackChunkName: "about" */ '../components/analys/industrialDistribution.vue')
  },
  // 经济指标
  {
    path: '/economicIndicators',
    name: 'economicIndicators',
    meta:{permissName:'钉钉经济指标统计',},
    component: () => import(/* webpackChunkName: "about" */ '../components/analys/economicIndicators.vue')
  },
   // 企业排查
  {
    path: '/companyInvestigation/:id?',
    name: 'companyInvestigation',
    meta:{permissName:'钉钉企业走访',},
    component: () => import(/* webpackChunkName: "about" */ '../components/work/companyInvestigation.vue')
  },
  // 问题填报
  {
    path: '/questionFill',
    name: 'questionFill',
    meta:{permissName:'钉钉问题填报',},
    component: () => import(/* webpackChunkName: "about" */ '../components/work/questionFill.vue')
  },
  // 走访记录
  {
    path: '/visitRecord',
    name: 'visitRecord',
    meta:{permissName:'钉钉走访记录',},
    component: () => import(/* webpackChunkName: "about" */ '../components/work/visitRecord.vue')
  },
  // 走访记录提交
  {
    path: '/visitOpinion/:title',
    name: 'visitOpinion',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/visitOpinion.vue')
  },
  // 走访记录问题填报
  {
    path: '/questionReport/:title',
    name: 'questionReport',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/questionReport.vue')
  },
  // 问题库
  {
    path: '/questionBank',
    name: 'questionBank',
    meta:{permissName:'钉钉问题库',keepAlive:true},
    component: () => import(/* webpackChunkName: "about" */ '../components/work/questionBank.vue')
  },
  // 问题详情
  {
    path: '/questionDetail/:title/:problemId',
    name: 'questionDetail',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/questionDetail.vue')
  },
  // 问题处置
  {
    path: '/questionDeal/:title/:type/:problemId',
    name: 'questionDeal',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/questionDeal.vue')
  },
  // 政策文件
  {
    path: '/policyDocument',
    name: 'policyDocument',
    meta:{permissName:'钉钉政策文件',},
    component: () => import(/* webpackChunkName: "about" */ '../components/work/policyDocument.vue')
  },
  // 政策文件详情
  {
    path: '/policyDetail/:id',
    name: 'policyDetail',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/policyDetail.vue')
  },
  // 接收到的政策文件详情（从钉钉消息中点进来）
  {
    path: '/policyDetailReceive/:id',
    name: 'policyDetailReceive',
    component: () => import(/* webpackChunkName: "about" */ '../components/work/policyDetailReceive.vue')
  },
  // 企业表格
  {
    path: '/industrialTable',
    name: 'industrialTable',
    component: () => import(/* webpackChunkName: "about" */ '../components/analys/industrialTable.vue')
  },
  // 公司详情
  {
    path: '/companyInfo',
    name: 'companyInfo',
    component: () => import(/* webpackChunkName: "about" */ '../components/query/companyInfo.vue')
  },
  // 公司列表
  {
    path: '/companyList',
    name: 'companyList',
    meta:{permissName:'钉钉问题库',},
    component: () => import(/* webpackChunkName: "about" */ '../components/query/companyList.vue')
  },
  // 空状态
  {
    path: '/emptyPage',
    name: 'emptyPage',
    component: () => import(/* webpackChunkName: "about" */ '../components/emptyPage.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
